/**
 * @(#) CompensationFacade.as
 *
 * @date		2009. 02. 20.
 * @version		1.0
 * @author		Shin, Yunwoo
 * @description	Application Facade
 * 				mvc간 주고 받는 메세지를 정의하고,  command를 등록한다. 
 */
package com.skt.common_hr.compensation
{
	import com.skt.common_hr.common.AppModuleManager;
	import com.skt.common_hr.common.Messages;
	import com.skt.common_hr.common.puremvc.CommonFacade;
	import com.skt.common_hr.compensation.controller.StartupCommand;
	
	import org.puremvc.as3.multicore.interfaces.IFacade;

	public class CompensationFacade extends CommonFacade
	{
		// Notification constants 
		public static const STARTUP:String = 'startup';
		public static const CLOSE_MODULE:String						= 'closeModule';
		public static const LOAD_FISCALYEARS_COMPLETE:String		= "loadFiscalYearsComplete";
		public static const LOAD_FISCALYEARS_FAILED:String			= "loadFiscalYearsFaild";
		public static const LOAD_PAYLIST_COMPLETE:String			= "loadPayListComplete";
		public static const LOAD_PAYLIST_FAILED:String				= "loadPayListFailed";
		public static const LOAD_PAYDETAIL_COMPLETE:String			= "loadPayDetailComplete";
		public static const LOAD_PAYDETAIL_FAILED:String			= "loadPayDetailComplete";
		public static const LOAD_REGNO_COMPLETE:String				= "loadRegNoComplete";
		public static const LOAD_REGNO_FAILED:String				= "loadRegNoFailed";
		public static const VALID_REGNO:String						= "validRegNo";
		public static const INVALID_REGNO:String					= "invalidRegNo";
		public static const VALID_PASSWORD:String					= "validPassword";
		public static const INVALID_PASSWORD:String					= "invalidPassword";
		public static const CONFORM_REGNO_CHECK:String				= "confirmRegNoCheck";
		public static const LOAD_PASSWORD_COMPLETE:String			= "loadPasswordComplete";
		public static const LOAD_PASSWORD_FAILED:String				= "loadPasswordFailed";
		public static const SAVE_NEWPASSWORD_COMPLETE:String		= "saveNewpasswordComplete";
		public static const SAVE_NEWPASSWORD_FAILED:String			= "saveNewpasswordFailed";
		public static const CHECK_PASSWORD_COMPLETE:String			= "checkPasswordComplete";
		public static const CHECK_PASSWORD_FAILED:String			= "checkPasswordFailed";
		public static const CHANGE_PASSWORD_COMPLETE:String			= "changePasswordComplete";
		public static const CHANGE_PASSWORD_FAILED:String			= "changePasswordFailed";
		
		
		public function CompensationFacade( key:String )
		{
			super(key);	
		}
		
        /**
         * Singleton ApplicationFacade Factory Method
         */
        public static function getInstance( key:String ) : CompensationFacade 
        {
            if ( instanceMap[ key ] == null ) instanceMap[ key ] = new CompensationFacade( key );
            return instanceMap[ key ] as CompensationFacade;
        }

		
        /**
         * Register Commands with the Controller 
         */
        override protected function initializeController( ) : void {
            super.initializeController();            
            registerCommand( STARTUP, StartupCommand);
        }
       
        public function startup(app:Object) :void {
        	//trace("send startup message in Compensation");
            sendNotification( STARTUP, app );
        }
	}
}